/*
    未解决
 */
var maxDepth = function (root) {
    function traverse(root, depth) {
        return Math.max(depth,
            ...root.children.map((child) => traverse(child, depth + 1))
        );
    }
    return root ? traverse(root, 1) : 0;
};